<!doctype html>
<html><!-- InstanceBegin template="/Templates/biTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<meta id="viewport" name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,user-scalable=no,target-densitydpi=300">
<!-- InstanceBeginEditable name="doctitle" -->
<title>智能云管家</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="EditRegion-jscode" -->
<link rel="shortcut icon" href="res/img/logo.png">
<link href="res/img/logo.png" rel="apple-touch-icon-precomposed">

<link rel="stylesheet" type="text/css" href="res/common.css">
<link rel="stylesheet" type="text/css" href="res/index/css/initbar.css">
<script src="../resources/js/jquery-1.7.2.min.js"></script>
<script src="res/index/js/initbar.js"></script>
<script src="res/common.js"></script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F883c1dc0c5cf74748ff6876f4606832f' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
var curphone = window.localStorage.getItem("curphone");
var userkey = window.localStorage.getItem("userkey");
var packname = window.localStorage.getItem("packname");
var cc=0;

var temp_items=[];
$(function(){
	
    addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); 
	addEventListener("orientationchange", function() { 
		setTimeout(hideURLbar, 0);
		
	 }, false);
	
      function hideURLbar(){ 
               window.scrollTo(0,1); 
      }
      if(navigator.userAgent.toLowerCase().indexOf("android", 0)<0){
         $("#footer").css({"center;z-index":"999","position":"fixed","bottom":"0"});
         window.scrollTo(0,1); 
        }else{
        $("#footer").css({"position":"fixed","bottom":"0"});
    var top = $("#footer").offset().top;
    $(window).scroll(function(){
    $("#footer").offset({top:$(document).scrollTop()+top});
    });
        }

       }); 
 $(document).ready(function(e) {
	
	// $("#floatbottom").animate({"bottom":"15px"});
	 if(detectDeviceType()=='Apple'){
		$("#viewport").attr("content","width=640,initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5,user-scalable=no");
	/*if(true)*/
	
		if(window.localStorage.getItem(window.localStorage.getItem("curphone"))=="1"){
			$("#floatbottom").show();
			$("#floatbottom").animate({"bottom":"15px"});
			window.localStorage.setItem(window.localStorage.getItem("curphone"),"n");

		}
	}
	var thisc=setInterval(function(){
		 if(cc==2)
			{
				clearInterval(thisc);
				$("#loading").hide();
				$(".floatBoxBg").hide();
			}
		 },200);

	
	var weaurl = jsonserver+"wea/101010100";
	$.getJSON(weaurl+".jsonp?callback=?",{},function(data){
		$("#weather1").append('<img src="'+data.weaImg+'"/>');
		$("#weather2").append(data.weaDesc+data.wendu);
	});
	
   	var u1=jsonserver+"bipb/userphone/"+curphone+"/"+userkey+"/bi";
	$.getJSON(u1+".jsonp?callback=?",{},function(data){
		if(data.sb.status=="00000")
		{
			$("#packname").append(data.packageDesc+'&nbsp;<img style="margin-bottom:5px" src="res/index/images/top_pic.png"/>');
			$("#checkout").text(data.timeForDatas);
			cc++;
			temp_items=data.pblist;
			$.each(data.pblist,function(i,items){
			switch(i)
			{
				case 0:
					initbar("call",items);
				break;
				case 1:
					initbar("flow",items);
				break;
				case 2:
					initbar("sms",items);
				break;
				/*case 3:
					if(items.visibleFlag)
					{
						initbar("mms",items);
					}
				break;*/
			}

				
			});
		
		}
	});


	var u2=jsonserver+"ab/userphone/"+curphone+"/"+userkey;
	$.getJSON(u2+".jsonp?callback=?",{},function(data){
		if(data.sb.status=="00000")
		{
			$(".account").html(data.textTemplate);
			cc++;
		}
		$("#billdet").bind("click",function(){
			window.location.href='billdetail.html';
		});
		
	});
	//<div style="background:url(res/index/images/backwo.jpg) repeat-x; width:100%; height:87px;"></div>
	var u3=jsonserver+"ra/rec/userphone/"+curphone+"/ostype/"+detectDeviceType()+"/cp/1/limit/10";
	$.getJSON(u3+".jsonp?callback=?",{},function(data){
		$.each(data,function(i,items){
			var appdiv=$("<div>").addClass("reclist").click(function(){
					window.location.href=items.link;
				});
			$(items.appText).appendTo(appdiv);
			appdiv.appendTo($("#content"));
		});
	overhidden();
	});
	$("body").bind("resize",function(){
		overhidden();
	});
	var centerdiv=$("<div>").html("<span style='color:#49494b;'>进入掌沃北京</span><img src='res/index/images/wob.png' style='padding-top:15px;'/>").bind("click",function(){
		window.location.href='http://bj.wo.com.cn/smart/page/?phonenum='+curphone+'&userkey='+userkey;
		});
	var woDiv=$("<div>").addClass("woDiv1");
	$("body").append('<div class="woDiv" onclick="download()"><span style="color:#49494b;">下载智能云管家客户端</span><img src="res/img/downll.png" style="padding-top:15px;"/></div>');
	centerdiv.appendTo(woDiv);	
	var wDiv=$("<div>").css("text-align","center").css("margin-top","10px").html('<span style="color:#676767; font-size:24px;">注:本页数据仅供参考，详细内容请以营业厅信息为准!</span>');
	
	wDiv.insertAfter($("#content"));
	woDiv.insertAfter($("body"));
});

	function showBar()
	{
		//alert($(localStorage.getItem("call")).html());
		
		//$("#call div").children().remove();
		$.each(temp_items,function(i,items){
				switch(i)
				{
					case 0:
						createkedu(localStorage.getItem("call"),items);
					break;
					case 1:
						createkedu(localStorage.getItem("flow"),items);
					break;
					case 2:
						createkedu(localStorage.getItem("sms"),items);
					break;
					/*case 3:
						if(items.visibleFlag)
						{
							createkedu(localStorage.mms,items);
						}
					break;*/
				}

				
			});
	}
function overhidden(){
	var w=document.body.clientWidth;
	$(".apptitle").width(0.4*w+"px");
	$(".apptypefee").width("120px");
}

function tipdown(){
	$("#floatbottom").hide();
}

//window.onresize=createkedu;
</script>
<!-- InstanceEndEditable -->
<style type="text/css">
*{
	font-family:Heiti SC;
	font-weight:600;
}
</style>
	<script type="text/javascript">
//var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
//document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2284c04845acdcd94dd640a8555927dc' type='text/javascript'%3E%3C/script%3E"));
</script>

</head>
<link rel="icon" href="res/img/logo.png" type="image/x-icon">
<link rel="shortcut icon" href="res/img/logo.png" type="image/x-icon"> 
<body style="margin:0;">

	<div id="header">
	<!-- InstanceBeginEditable name="EditRegion-header" -->
    <table width="100%" height="100%">
    	<tr>
        	<td width="10%">
            <div id="weather1" style="font-size:24px"></div>
            </td>
            <td width="10%">
            <marquee id="weather2" style="font-size:24px"></marquee>
            </td>
            <td width="60%" onClick="javascript:window.location.href='myBusiness.html'">
            <span id="packname" style="font-size:34px; font-weight:bold; color:#fff;"></span>
            </td>
            <td width="20%">
            <div style="padding-top:15px">
            <img src="res/index/images/set.png" onClick="window.location.href='config.html'"/>
            </div>
            </td>
        </tr>
    </table>
	<!-- InstanceEndEditable -->
    </div>
    <div id="content">
    <div id="loading" class="loading"><img src="res/loading.gif"/>载入中...</div>
    <div class="floatBoxBg"></div>
	<!-- InstanceBeginEditable name="EditRegion-content" -->
    <div onClick="window.location.href='activity.html'"><img width="100%" src="res/img/adtivity/bar.jpg"/></div>
<div id="mainDatas">
<div class="checkout">
	截止：<span id="checkout" style="color:#34840c"></span>
</div>
<div id="flow" onClick="window.location.href='detail.html?busiType=2'">
	<div class="mainIcon" title="as"></div>
    <div class="warnIcon"></div>
	<div class="process">  
        <div id="bgdiv">
            <div id="showdiv"></div>
        </div>
    </div>
</div>

<div id="call" onClick="window.location.href='detail.html?busiType=1'">
	<div class="mainIcon"></div>
    <div class="warnIcon"></div>
	<div class="process"> 
		<div id="bgdiv">
            <div id="showdiv"></div>
        </div>
    </div>
</div>

<div id="sms" onClick="window.location.href='detail.html?busiType=3'">
	<div class="mainIcon"></div>
    <div class="warnIcon"></div>
    <div class="process"> 
		<div id="bgdiv">
            <div id="showdiv"></div>
        </div>
    </div>
</div>

<div id="mms" onClick="window.location.href='detail.html?busiType=4'">
	<div class="mainIcon"></div>
    <div class="warnIcon"></div>
    <div class="process"> 
		<div id="bgdiv">
            <div id="showdiv"></div>
        </div>
    </div>
</div>
<div id="billdet" class="account">
</div>

</div>

<div id="floatbottom" style="position:fixed; display:none; bottom:-140px; left:19%; height:173px; line-height:86px; width:60%;; border-left:#ccc 2px solid; border-right:#ccc 2px solid; border-radius:10px; font-size:24px; background:url(res/img/todeskback.png); padding-left:10px;" onclick="tipdown()">
	<table border="0" width="100%" style="background:url(res/img/deskexit.png) no-repeat; opacity:1.0; background-position:98% 0px; margin-top:10px;">
    	<tr>
        	<td align="center"><img src="res/img/floatLogo.png" style="margin-top:5px"/></td>
            <td><span style="font-size:28px;">先点击</span><img src="res/img/temp_log.png"/><br><br><span style="font-size:30px;">再"添加到主屏幕"</span></td>
        </tr>
    </table>
<img src="res/img/desksanjiao.png" style="position:relative; top:-13px; left:46%;"/>
</div>
	<!-- InstanceEndEditable -->
    </div>
    <!-- InstanceBeginEditable name="EditRegion-footer" -->
	<!-- InstanceEndEditable -->
    <div id="footer">
    </div>
    
</body>
<!-- InstanceEnd -->
</html>
